<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="./css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
</head>
<body>


<div class="container">
    <div class="row" style="margin-top: 20px;">
        <div class="col-xs-12" style="margin-bottom: 20px">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="row">
                        <div class="col-xs-9">
                            <div class="input-group">
                                <input type="text" class="form-control" placeholder="搜索">
                                <span class="input-group-btn">
                                    <button class="btn btn-default" type="button">
                                        <span class="glyphicon glyphicon-search"></span>
                                    </button>
                                  </span>
                            </div><!-- /input-group -->
                        </div>
                        <div class="col-xs-3">
                            <div class="dropdown">
                                <div id="dLabel" data-target="#" data-toggle="dropdown" class="btn">
                                    <span class="glyphicon glyphicon-th-list"></span> 通信录
                                </div>

                                <ul class="dropdown-menu" aria-labelledby="dLabel">
                                    <li>
                                        <a href="#">添加</a>
                                    </li>
                                    <li>
                                        <a href="./index3.php">列表</a>
                                    </li>
                                </ul>
                            </div>

                        </div>
                    </div>

                </div>

            </div>
        </div>
        <div class="col-xs-12">


            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">添加联系人</h3>
                </div>
                <div class="panel-body">

                    <form class="form-horizontal" method="post" action="add.php" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="inputEmail3" class="col-xs-4 control-label"
                                   style="text-align: right;">姓名</label>
                            <div class="col-xs-8">
                                <input type="text" class="form-control" id="inputEmail3" name="name"
                                       placeholder="请输入联系人">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="icon" class="col-xs-4 control-label"
                                   style="text-align: right;">头像</label>
                            <div class="col-xs-8">
                                <input type="file" class="form-control" id="icon" name="icon">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputPassword3" class="col-xs-4 control-label"
                                   style="text-align: right;">手机号</label>
                            <div class="col-xs-8">
                                <div class="input-group">
                                    <input type="number" class="form-control" id="inputPassword3" name="mobile"
                                           placeholder="请输入手机号">
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" type="button" data-toggle="modal"
                                                data-target="#delPhone">删除</button>
                                    </span>
                                </div><!-- /input-group -->
                            </div>

                            <div class="modal fade" id="delPhone">
                                <div class="modal-dialog" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span></button>
                                            <h4 class="modal-title">确定删除</h4>
                                        </div>
                                        <div class="modal-body">
                                            您确定删除 手机号：xxxxx ?
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">取消
                                            </button>
                                            <button type="button" class="btn btn-primary">确定</button>
                                        </div>
                                    </div><!-- /.modal-content -->
                                </div><!-- /.modal-dialog -->
                            </div><!-- /.modal -->

                        </div>
                        <div class="form-group">
                            <label for="a" class="col-xs-4 control-label" style="text-align: right;">QQ</label>
                            <div class="col-xs-8">

                                <div class="input-group">
                                    <input type="number" class="form-control" id="a" name="qq" placeholder="请输入qq">
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" type="button" data-target="#delQQ"
                                                data-toggle="modal">删除</button>
                                    </span>
                                </div><!-- /input-group -->

                            </div>


                            <div class="modal fade" id="delQQ">
                                <div class="modal-dialog" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span></button>
                                            <h4 class="modal-title">确定删除</h4>
                                        </div>
                                        <div class="modal-body">
                                            您确定删除 QQ：xxxxx ?
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">取消
                                            </button>
                                            <button type="button" class="btn btn-primary">确定</button>
                                        </div>
                                    </div><!-- /.modal-content -->
                                </div><!-- /.modal-dialog -->
                            </div><!-- /.modal -->
                        </div>
                        <div class="form-group">
                            <label class="col-xs-4 control-label" style="text-align: right;">添加</label>
                            <div class="col-xs-8">
                                <button class="btn btn-default" type="button" data-toggle="modal"
                                        data-target="#showAdd">
                                    <span class="glyphicon glyphicon-plus"></span>
                                </button>
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-xs-offset-4 col-xs-8">
                                <button type="submit" class="btn btn-primary">添加</button>
                                <button type="button" class="btn btn-default">取消</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="showAdd">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">添加条目</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">类型</label>
                        <div class="col-sm-10">
                            <select class="form-control">
                                <option>手机号</option>
                                <option>生日</option>
                                <option>年龄</option>
                                <option>座机</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">内容</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" placeholder="Password">
                        </div>
                    </div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="./js/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="./js/bootstrap.min.js"></script>
</body>
</html>